<template>
  <view class="container">
    <header>
      <view @click="$goPath(1)">
        <image src='/static/images/right-white.png' mode='aspectFit|aspectFill|widthFix' alt=""  />
        <view >物流详情</view>
      </view>
      <view>
        订单号：{{ orderDetail.orderNo }}
      </view>
    </header>

    <section>
      <swiper autoplay="true" circular="true" indicatorDots="true" class="swiper-box"> 
        <swiper-item v-for="item in orderDetail.pocketDTOList" :key="item">
          <view class="sect-img">
            <view class="goods-img">
              <image :src="item.detailDTOList[0].thumbnailUrl" mode="aspectFit|aspectFill|widthFix" lazy-load="false" ></image>
              <text>共{{item.detailDTOList.length}}件</text>
            </view>

            <view class="logistics-text">快递公司：{{ item.logisticsCompany }}</view>
            <view class="logistics-text">物流单号：{{ item.logisticsNo }}</view>
          </view>

          <view class="logistics-list">
            <u-steps direction="column" dot activeColor="#32B499">
              <u-steps-item v-for="logisticsItem in item.logisticsDTOList" :key="item" :title="logisticsItem.context" :desc="logisticsItem.ftime">
              </u-steps-item>
            </u-steps>
          </view>
        </swiper-item>
      </swiper>
    </section>
  </view>
</template>

<script>

export default {
  data() {
    return {
      orderDetail: {},
      logisticsList: [],
    }
  },

  methods: {

  },

  onLoad(options) {
    this.orderDetail = JSON.parse(decodeURIComponent(options.orderDetail));
    console.log(this.orderDetail)
  },

}
</script>
<style scoped>
.container {
  width: 100%;
  height: 100vh;
  font-size: 28rpx;
  background-color: #FFFFFF;
  display: flex;
  flex-direction: column;
  font-family: 'PingFang SC-Medium';
  color: #333;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.container > header {
  width: 100%;
  padding: 100rpx 24rpx 24rpx;
  border-radius: 0 0 40rpx 40rpx;
  box-sizing: border-box; 
  color: #fff; 
  background-color: #32B499;  
  background-image: url('https://youpindou.com/miniProgram/image/showImg?imgUrl=/home/ypd/images/homeTopIcon.png');
  background-size: 100% auto;
  background-repeat: no-repeat;
}

.container > header > view:first-child {
  font-size: 40rpx;
  font-family: 'PingFang SC-Bold';
  display: flex;
  align-items: center;
  margin-bottom: 24rpx;
}

.container header image {
  width: 16rpx;
  height: 32rpx;
  display: block;
  margin-right: 6rpx;
}

.container section {
  flex: 1;
  padding: 24rpx;
  box-sizing: border-box;
  overflow-y: auto;
}

.swiper-box {
  height: 200%;
}

.sect-img {
  width: 100%;
  height: 300rpx;
  background-image: url(https://youpindou.com:8083/doudougou/image/showImg?imgUrl=/home/ddg_test/images/e1e95819-6439-437e-ae4d-6f279322d167.png);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  padding: 24rpx;
  box-sizing: border-box;
}

.goods-img {
  display: flex;
  align-items: flex-end;
}

.goods-img > image {
  width: 80rpx;
  height: 80rpx;
  display: block;
  margin-right: 24rpx;
  border-radius: 10rpx;
}

.logistics-text {
  margin-top: 24rpx;
  color: #6A4D28;
}

.logistics-list {
  background-color: #fff;
}
</style>